/*
You need to write regex that will validate a password to make sure it meets the following criteria:

At least six characters long
contains a lowercase letter
contains an uppercase letter
contains a number
Valid passwords will only be alphanumeric characters.
*/

function validate(password) {
    console.log(password);
    const word = /^[A-Za-z0-9]*$/.test(password);
    const length = /[A-Za-z0-9]{6,}/.test(password);
    const uppercase = /[A-Z]+/.test(password);
    const lowercase = /[a-z]+/.test(password);
    const number = /[0-9]+/.test(password);
    return word && length && uppercase && lowercase && number;
}

function validate(password) {
    return /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])[a-zA-Z0-9]{6,}$/.test(password);
}